package zust.javaee.enums;

/**
 * Created by liy on 2017/1/8.
 */
public enum FormStatusEnum {

    DELETED((short)-2,"已删除"),
    UNPASS((short)-1,"未通过"),
    CHECKING((short)0,"待审核"),
    PASS((short)1,"已通过");

    private Short status;

    private String info;


    public static FormStatusEnum stateOf(int index) {
        for (FormStatusEnum e : values()) {
            if (e.getStatus() == index) {
                return e;
            }
        }
        return null;
    }


    private FormStatusEnum(Short status, String info) {
        this.status = status;
        this.info = info;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

}
